This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
Fix allowed change to work per version #1029
Merged
+176
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Bug fix
In case a package is installed in multiple projects, allowed change will only consider the highest installed version instead of looking at each version independently. This results in unexpected updates for packages outside of the allowed change range. For example, if one project has version 12.0.3 for
Newtonsoft.Json
but another one is still working with version 6.0.3, even when specifying--change Minor
, it will try to update the 6.0.3 to12.X.X
.We cannot make assumptions about other projects as we don't know if they will end up being loaded into the same process.
This fix ensures that different versions of the same package are only grouped, if that doesn't result in allowed change being ignored.
🆕 What is the new behavior (if this is a feature change)?
N/A
💥 Does this PR introduce a breaking change?
No.
🐛 Recommendations for testing
Test whether the correct updates are being applied when there are multiple versions of the same package across different projects that are outside of the allowed change range for each other.
Test whether the correct updates are being applied if there are multiple versions of the same package across different projects that are inside the allowed change range of each other.
📝 Links to relevant issues/docs
🤔 Checklist before submitting